package com.xiaoc.bulldozer.common.service.impl;

import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.xiaoc.bulldozer.common.dao.DataPriviledgeMapper;
import com.xiaoc.bulldozer.common.dto.DataPriviledgeQueryDto;
import com.xiaoc.bulldozer.common.model.DataPriviledge;
import com.xiaoc.bulldozer.common.service.DataPriviledgeService;

/**
 * DataPriviledge Service 实现类
 * 
 * @author Danfo Yam
 * 
 * @date 2018-12-13 09:57:03
 */
@Service("dataPriviledgeService")
public class DataPriviledgeServiceImpl implements DataPriviledgeService {

    @Resource
    private DataPriviledgeMapper dataPriviledgeMapper;

    @Override
    public Integer getDataPriviledgeCountByCondition(DataPriviledgeQueryDto DataPriviledgeQueryDto) {
        return dataPriviledgeMapper.getDataPriviledgeCountByCondition(DataPriviledgeQueryDto);
    }

    @Override
    public List<DataPriviledge> getDataPriviledgeListByCondition(DataPriviledgeQueryDto DataPriviledgeQueryDto) {
        return dataPriviledgeMapper.getDataPriviledgeListByCondition(DataPriviledgeQueryDto);
    }

    @Override
    public DataPriviledge getDataPriviledgeById(Integer id) {
        return dataPriviledgeMapper.getDataPriviledgeById(id);
    }

    @Override
    public List<DataPriviledge> getAllDataPriviledgeList() {
        return dataPriviledgeMapper.getAllDataPriviledgeList();
    }
    
    @Override
    public void save(DataPriviledge DataPriviledge) {
        dataPriviledgeMapper.save(DataPriviledge);
    }

    @Override
    public void update(DataPriviledge DataPriviledge) {
        dataPriviledgeMapper.update(DataPriviledge);
    }

    @Override
    public void deleteById(Integer id) {
        dataPriviledgeMapper.deleteById(id);
    }

    @Override
    public List<DataPriviledge> getDataPriviledgeListByRoleIdListAndType(List<Integer> roleIdList, Integer type) {
        return dataPriviledgeMapper.getDataPriviledgeListByRoleIdListAndType(roleIdList, type);
    }
}
